<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui"
	xmlns:f="http://java.sun.com/jsf/core">

<h:head>
	<title>祖龙娱乐  - BI系统</title>
	<link href="../../css/component.css" rel="stylesheet" type="text/css" />
	<script type="text/javascript" src="../../js/highcharts.js"></script>
	<script type="text/javascript" src="../../js/drawChart.js"></script>
</h:head>

<h:body>
	<ui:param name="bean" value="#{advWarnInputAction}" />
	
	<span class="pagetitle">市场数据分析 —— 积分墙统计数据</span>
	<p:separator />
	
	<!-- 右侧页面顶部查询部分 -->
	<h:form id="fsearch">
		<h:outputLabel id="radioHide" value="#{bean.dateRadio}" style="visibility: hidden"/>
	
	    <p:outputPanel id="customPanel" style="margin-bottom:10px">
	        <p:selectOneRadio id="customRadio" value="#{bean.dateRadio}" layout="custom">
	            <f:selectItem itemLabel="1" itemValue="1" />
	            <f:selectItem itemLabel="2" itemValue="2" />
	            <f:selectItem itemLabel="7" itemValue="7" />
	            <f:selectItem itemLabel="15" itemValue="15" />
	            <f:selectItem itemLabel="30" itemValue="30" />
	            <f:selectItem itemLabel="-1" itemValue="-1" />
	     	</p:selectOneRadio>
	 
	        <h:panelGrid id="opt" columns="20" cellpadding="7">
	            <p:radioButton id="opt1" for="customRadio" itemIndex="0" /> 
	            <h:outputLabel for="opt1" value="昨日" />
	            <h:outputLabel />
	            
	            <p:radioButton id="opt2" for="customRadio" itemIndex="1" /> 
	            <h:outputLabel for="opt2" value="前日" />
	            <h:outputLabel />
	 
	            <p:radioButton id="opt3" for="customRadio" itemIndex="2" />
	            <h:outputLabel for="opt3" value="近7天" />
	            <h:outputLabel />
	 
	            <p:radioButton id="opt4" for="customRadio" itemIndex="3" />
	            <h:outputLabel for="opt4" value="近15天" />
	            <h:outputLabel />
	 
	            <p:radioButton id="opt5" for="customRadio" itemIndex="4" />
	            <h:outputLabel for="opt5" value="近30天" />
	            <h:outputLabel />
	             
	            <p:radioButton id="opt6" for="customRadio" itemIndex="5" />
	            <h:outputLabel for="opt6" value="自定义 开始时间" />
           	 	<p:calendar value="#{bean.dateStart}" mode="popup" pattern="yyyy-MM-dd">
           	 	</p:calendar>
				<h:outputLabel for="opt6" value="结束时间" />
				<p:calendar value="#{bean.dateEnd}" mode="popup" pattern="yyyy-MM-dd">
				</p:calendar>
        		<p:commandButton  id="ajax" value="查询" update=":#{p:component('dform')} :fsearch" action="#{bean.search()}"/>
	        </h:panelGrid>
	    </p:outputPanel>

        <p:growl id="growl" showDetail="true" sticky="true" />
	</h:form>
	<br />
	
	<!-- 数据展示部分，包含表格和图表 -->
	<h:form id="dform">
		<h:panelGrid columns="1" style="width:100%">
             <div id="basewidth" style="width:92%;height:0; border:0;" />
        </h:panelGrid>
		<div class="data" id="data">
			<p:panel id="panel" header="详细数据" style="margin-bottom:10px;">
				<p:tabView>
				    <p:tab title="异常数据概况" id="active">
			    		<p:dataTable id="dlist1" var="l" value="#{bean.warningDatas}" scrollable="true" resizableColumns="true" paginator="true" paginatorPosition="top" paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown} {Exporters}" rowsPerPageTemplate="15,30" rows="15" style="text-align:center;">
							<f:facet name="{Exporters}">
								<h:commandLink styleClass="exporter">
							        <p:graphicImage url="/resources/images/excel.png" height="25px"/>
							        <p:dataExporter type="xls" target="dlist1" fileName="instanceStayActiveRadios-#{pageHelper.getNewDateDetailStr()}" />
							    </h:commandLink>
							</f:facet>
							<p:column headerText="日期"   sortBy="#{l.logday}">
								<h:outputLabel value="#{l.logday}" />
							</p:column>
							<p:column headerText="分类"   sortBy="#{l.kindtype}">
								<h:outputLabel value="#{l.kindtype}" />
							</p:column>
							<p:column headerText="来源"   sortBy="#{l.source}">
								<h:outputLabel value="#{l.source}" />
							</p:column>
							<p:column headerText="激活数"   sortBy="#{l.active}">
								<h:outputLabel value="#{l.active}" />
							</p:column>
							<p:column headerText="新增设备数"  sortBy="#{l.newMac}">
								<h:outputLabel value="#{l.newMac}" />
							</p:column>
						</p:dataTable>
				    </p:tab>
				</p:tabView>
			</p:panel>
		</div>
	</h:form>
	<!-- 页脚 -->
	<div class="footer"></div>
</h:body>
</html>